import { mapState } from "vuex";
const share = {
    data() {
        return {

        }
    },
    ...mapState(["userInfo"]),
    async onShareAppMessage(res) {
        let { id, avatar, nick_name } = this.userInfo;

        var type = res.from === "button" ? 2 : 1;
        const shareId = await this.getShareId(type);
        console.log(`shareId=${shareId}&avatar=${avatar}&name=${nick_name}`);
        return {
            title: "邀请好友获返币",
            path: `/pages/invitate/invitateUser?shareId=${shareId}&avatar=${avatar}&name=${nick_name}`,
        };
    },
}